﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
    <object
   classid="clsid:41DDF6FF-E02C-35FF-99DE-B5BC20576862" id="comcardmanager">
</object>
		<title>HTML COMCardmanager JavaScript Demo</title>
	    <style type="text/css">
            .style1
            {
                width: 51px;
            }
            #TextArea1
            {
                width: 540px;
            }
            .style2
            {
                width: 490px;
            }
            #TextArea2
            {
                width: 540px;
            }
            .style3
            {
                width: 37px;
            }
        </style>
	
    <script type='text/javascript' language='javascript'> 
        var jsonCG;
        var jsonPC;

        function callReadCG () 
            { 
            try { 
                var mycomcardmanager; 
                mycomcardmanager = new ActiveXObject ("COMCardmanager.Card"); 
                jsonCG = mycomcardmanager.readCG();              
            } 
            catch (e) 
            { 
                jsonCG = e.message; 
            } 
            document.getElementById('TextArea1').value = jsonCG;

        }


        function callReadCG2() {
            try {
                //var mycomcardmanager;
                //mycomcardmanager = new ActiveXObject("COMCardmanager.Card");
                jsonCG = comcardmanager.readCG();
            }
            catch (e) {
                jsonCG = e.message;
            }
            document.getElementById('TextArea2').value = jsonCG;

        } 
    </script> 
    
    </head>
	<body>
	
	    <table style="width:100%;">
            <tr>
                <td class="style1">
                    <input id="ButtonCG" type="button" value="ReadCG" onclick="callReadCG()" /></td>
                <td class="style2">
                    <textarea id="TextArea1" name="S1" rows="2" cols="1"></textarea></td>
                <td class="style3">
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <input id="ButtonPC" type="button" value="ReadCG2" /></td>
                <td class="style2">
                    <textarea id="TextArea2" name="S2" rows="2" cols="1"></textarea></td>
                <td class="style3">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;</td>
                <td class="style2">
                    &nbsp;</td>
                <td class="style3">
                    &nbsp;</td>
            </tr>
        </table>
	
	</body>
</html>